package com.pig4cloud.pigx.knowledge.service;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.UserMessage;
import reactor.core.publisher.Flux;

/**
 * AI 流助手服务
 *
 * @author lengleng
 * @date 2024/09/27
 */
public interface AiStreamAssistantService {

	/**
	 * 流式聊天
	 * @param memoryId 内存 ID
	 * @param userMessage 用户消息
	 * @return {@link Flux }<{@link String }>
	 */
	Flux<String> chat(@MemoryId String memoryId, @UserMessage String userMessage);

}
